/**
 * @author chenjuan
 * @time 2022-1*17 23:16
 * @description 配置状态数据管理方法
 */
 export default {
    namespaced: true,
    state: {
        token: '123',
        userInfo: {}
    },
    getters: {
        token(state) {
            return state.token
        },
        userInfo(state) {
            return state.userInfo
        }
    },
    actions: {
        tokenAct({commit}, token) {
            commit('tokenMut', token)
        },
        userInfoAct({commit}, userInfo) {
            commit('userInfoMut',userInfo)
        }
    },
    mutations: {
        tokenMut(state, token) {
            state.token = token
        },
        userInfoMut(state, userInfo) {
            state.userInfo = userInfo
        }
    }
}